﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Cart.aspx.cs" Inherits="Web.Cart" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="row">
        <h3 class="list-group-item active heading">
            Giỏ Hàng</h3>
        <asp:GridView ID="GridView1" runat="server" CssClass="table table-hover" 
            AutoGenerateColumns="False" BorderStyle="None" GridLines="None">
            <Columns>
                <asp:TemplateField HeaderText="Hình Ảnh">
                    <ItemTemplate>
                        <asp:Image ID="Image1" runat="server" 
                            ImageUrl='<%# Eval("HinhAnh") %>' Width="70px" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="MaHang" HeaderText="Mã ">
                <ItemStyle Width="100px" />
                </asp:BoundField>
                <asp:BoundField DataField="TenHang" HeaderText="Tên Hàng" />
                <asp:BoundField DataField="DVT" HeaderText="DVT" />
                <asp:BoundField DataField="DonGia" HeaderText="Đơn Giá" />
                <asp:TemplateField HeaderText="Số Lượng">
                    <ItemTemplate>
                        <asp:TextBox ID="txtSoLuong" runat="server" Text='<%# Eval("SoLuong") %>' 
                            TextMode="Number"></asp:TextBox>
                        <asp:HiddenField ID="hfMaHang" runat="server" Value='<%# Eval("MaHang") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="ThanhTien" HeaderText="Thành Tiền" />
            </Columns>
            <EmptyDataTemplate>
                Hiện tại bạn chưa mưa sản phẩm nào, hãy quay về
                <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/Products.aspx">Trang sản phẩm</asp:HyperLink>
                &nbsp;để mua hàng !
            </EmptyDataTemplate>
        </asp:GridView>
        <p>
            Tổng tiền : 
            <asp:Label ID="lblTongTien" runat="server" Text="Label" ForeColor="Red"></asp:Label> VNĐ
        </p>
        <br />
        <a href="Products.aspx" class="btn btn-default">
            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Mua tiếp
        </a>
        <asp:LinkButton ID="btnUpdate" CssClass="btn btn-primary" runat="server" 
            onclick="btnUpdate_Click"> <span class="glyphicon glyphicon-edit" aria-hidden="true"></span> Cập nhật</asp:LinkButton>
        <a href="Checkout.aspx" class="btn btn-success">
            <span class="glyphicon glyphicon-usd" aria-hidden="true"></span> Thanh Toán
        </a>
    </div>
    
</asp:Content>
